package com.ksc.storekeeper.client.view.validation;

import com.github.gwtbootstrap.client.ui.base.TextBox;



public class ValidatingTelecom extends TextBox implements IsTelecomValidatingWidget<String> {
	private final ValidatingTelecomHelper<String> helper;

	public ValidatingTelecom() {
		helper = new ValidatingTelecomHelper<String>(this);
	}

	public void setRequired(boolean required) {
		helper.setRequired(required);
	}

	@Override
	public Validation validateLandline() {
		return helper.validateLandLine();
	}

	@Override
	public Validation validateAdslUsername() {
		return helper.validateAdslUsername();
	}

	@Override
	public Validation validateMobileNumber() {
		return helper.validateMobileNumber();
	}

	@Override
	public Validation validateContactNumber() {
		return helper.validateContactNumber();
	}

	@Override
	public void showInvalid() {
		helper.showInvalid();
	}

	@Override
	public void removeInvalid() {
		helper.removeInvalid();
	}

	@Override
	public String getErrorMessage() {
		return helper.getErrorMessage();
	}

	public void setNumeric(boolean numeric) {
		helper.setNumeric(numeric);
	}

	@Override
	public Validation validateGSMNumber() {
		return helper.validateGSMNumber();
	}

	@Override
	public Validation validateCDMANumber() {
		return helper.validateCDMANumber();
	}

	@Override
	public Validation validateNcellPostpaidNumber() {
		return helper.validateNcellPostpaidNumber();
	}

	@Override
	public Validation validateCDMAPostPaidNumber() {
		return helper.validateCDMAPostPaidNumber();
	}

	@Override
	public Validation validateGSMPostPaidNumber() {
		return helper.validateGSMPostPaidNumber();
	}

	@Override
	public void setMaxLength(int len) {
		super.setMaxLength(len);
	}

}